﻿<%@ Page Language="c#" CodeBehind="ListDocument.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.DocumentFlowPages.ListDocumentPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>文档流转</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
</head>
<body>
  <form id="ListDocument" method="post" runat="server">
    <uds:PageTitle runat="server" HintImage="~/DataImages/DocFlow.gif" Title="文档流转" />
    <div>
      <table style="margin-top: 8px;" cellspacing="0" cellpadding="0" border="0">
        <tr>
          <td class="<%= DisplayType==DocumentPageDisplayType.MyPostil ? "selectedTab" : "unselectedTab" %>"><a href="ListDocument.aspx?DisplayType=<%= (int)DocumentPageDisplayType.MyPostil %>" class="Newbutton">我的批阅</a></td>
          <td class="<%= DisplayType==DocumentPageDisplayType.MyDocument ? "selectedTab" : "unselectedTab" %>"><a href="ListDocument.aspx?DisplayType=<%= (int)DocumentPageDisplayType.MyDocument %>" class="Newbutton">我的申请</a></td>
          <td class="<%= DisplayType==DocumentPageDisplayType.Postiled ? "selectedTab" : "unselectedTab" %>"><a href="ListDocument.aspx?DisplayType=<%= (int)DocumentPageDisplayType.Postiled %>" class="Newbutton">已经批阅</a></td>
          <td class="unselectedTab"><a href="DraftList.aspx" class="Newbutton">拟稿箱</a></td>
          <%if (ManageFlow)
            {%>
          <td class="unselectedTab"><a href="ListView.aspx" class="Newbutton">流程管理</a></td>
          <%}%>
        </tr>
      </table>
    </div>
    <uds:UDSDataGrid ID="dgDocumentList" runat="server" OnPageIndexChanged="DataGrid_PageChanged">
      <Columns>
        <asp:TemplateColumn HeaderText="ID">
          <HeaderStyle Width="2%" />
          <ItemTemplate>
            <asp:CheckBox ID="Flow_ID" runat="server" />
          </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="文档标题">
          <HeaderStyle HorizontalAlign="Left" />
          <ItemStyle HorizontalAlign="Left" />
          <ItemTemplate>
            <a href="<%# GetDisplayDocumentUrl(((DocumentBriefInfo)Container.DataItem).DocID)%>"><%# HttpUtil.HtmlEncode( ((DocumentBriefInfo)Container.DataItem).Title, "[未指定]") %></a>
          </ItemTemplate>
        </asp:TemplateColumn>
        <asp:BoundColumn DataField="CreatorRealName" HeaderText="拟稿人">
          <HeaderStyle Width="10%" />
        </asp:BoundColumn>
        <asp:HyperLinkColumn DataNavigateUrlField="FlowID" DataNavigateUrlFormatString="DisplayFlow.aspx?FlowID={0}" DataTextField="FlowName" HeaderText="流程名">
          <HeaderStyle HorizontalAlign="Center" Width="20%" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:HyperLinkColumn>
        <asp:TemplateColumn HeaderText="当前环节">
          <ItemTemplate>
            <a href="<%#GetDisplayTacheMemberUrl(((DocumentBriefInfo)Container.DataItem).DocID) %>"><%# HttpUtility.HtmlEncode(((DocumentBriefInfo)Container.DataItem).StepName)%></a>
          </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="拟稿时间">
          <ItemTemplate>
            <%# Utility.FormatDate( ((DocumentBriefInfo)Container.DataItem).TimeCreated ) %>
          </ItemTemplate>
        </asp:TemplateColumn>
        <asp:BoundColumn DataField="StatusStr" HeaderText="状态">
          <HeaderStyle HorizontalAlign="Center" Width="8%" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:BoundColumn>
      </Columns>
    </uds:UDSDataGrid>
  </form>
</body>
</html>
